import type { PublishDataType } from "@/types/publish"
import { request } from "@/utils/request"

/**
 * 上传图片
 */
export const uploadActionAPI = (fd: FormData) => {
  return request<{ url: string }>('/v1_0/upload', 'POST',fd )
}


/**
 * 发布文章
 */
export const publishArticleAPI = (data: PublishDataType) => {
  return request('/v1_0/mp/articles', 'POST', data)
}
